package com.cqan.dao.account;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Component;

import com.cqan.dao.HibernateDao;
import com.cqan.entity.account.Permission;

/**
 * @author slaton
 * 
 *         上午11:31:11
 */
@Component
public class PermissionDao extends HibernateDao<Permission, String> {

	/**
	 * 描述
	 * 
	 * @param authoritys
	 * @return
	 */

	public List<Permission> getMenusByAuthority(List<String> authoritys) {
		
		return getSession().createCriteria(Permission.class).add(Restrictions.in("code", authoritys)).list();
	}

}
